package com.onLineCar.dispatch.mq.consumer;

import com.onLineCar.dispatch.mq.QueueConfig;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DispatchConsumer {

    @RabbitHandler
    @RabbitListener(queues = QueueConfig.DISPATCH_QUEUE_NAME)
    public void dispatch(String message) {
        System.out.println("消费者收到消息：" + message);
    }
}
